/**
 * 
 */
package operators;
import java.util.*;
import utils.Pair;
/**
 * @author zengzh
 *
 */
public class Relation {

	/**
	 * encapsulate input info
	 */
	public String Relname;
	public Vector<String> attr_list;
	/*
	 * candidate keys. choose first one as the primary key
	 */
	public Vector<Vector<String>> keys;
	/*
	 * inclusion dependencies
	 * format List<Pair<attr sequence, Pair<dependent relation, dependent attr sequence>>>
	 */
	public Vector<Pair<Vector<String>,Pair<String,Vector<String>>>> ind_list;
	
	public Relation(String Relname) {
		// TODO Auto-generated constructor stub
		this.Relname = Relname;
		this.attr_list = new Vector<String>();
		this.keys = new Vector<Vector<String>>();
		this.ind_list = new Vector<Pair<Vector<String>,Pair<String,Vector<String>>>>();
	}
	
	public void addAttr(String attr)
	{
		this.attr_list.add(attr);
	}
	
	public void addKey(Vector<String> key)
	{
		this.keys.add(key);
	}
	
	public void addInd(Pair<Vector<String>,Pair<String,Vector<String>>> ind_pair)
	{
		this.ind_list.add(ind_pair);
	}

}
